<div class="menu" xmlns="http://www.w3.org/1999/xhtml"
     xmlns:s="http://jboss.com/products/seam/taglib"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <ul>
        <li id="page_home"><s:link view="/home.xhtml" value="首页" propagation="none"/></li>
        <f:subview id="my_orders_link" rendered="#{identity.loggedIn}">
            <li id="page_orders"><s:link view="/showorders.xhtml" value="我的订单" propagation="none"/></li>
        </f:subview>
        
        <f:subview id="my_account_link" rendered="#{identity.loggedIn}">
            <li id="page_accounts"><s:link view="/myaccount.xhtml" value="我的帐户" propagation="none"/></li>
        </f:subview>
        
        <li id="page_cart"><s:link view="/shoppingcart.xhtml" value="购物车" propagation="none"/></li>
         <h:outputText value="欢迎, #{identity.username}!" rendered="#{identity.loggedIn}"/>
      
        <s:link view="/home.xhtml" action="#{identity.logout}" value="注销" rendered="#{identity.loggedIn}" propagation="none"/>
    </ul>

    <script type="text/javascript" language="JavaScript">
        function setClass(id, className) {
            var obj = document.getElementById(id);
            if (obj != null) {
                obj.className = className;
            }
        }
        setClass("page_" + "#{page}", "current");
    </script>

</div>
  
